package com.sumainfor.zuul.service.impl;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.zuul.dao.AreaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 功能描述:
 * 格式中心
 * @Auther: zhlu
 * @Date: 2019/1/21 15:28
 * @Description:
 */
@Service
public class AreaService {

    @Autowired
    AreaMapper AreaMapper;

    /**
     * 功能描述: 
     * 获取用户当前归属公司
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/1/21 15:34
     */
    public List<Map<String,Object>> getAreaList(Map<String,Object>params){
        List<Map<String,Object>> getAreaList=AreaMapper.getAreaList(params);
        return getAreaList;
    }

    /**
     * 功能描述: 
     * 获取所有的公司列表
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/16 14:11
     */
    public List<Map<String,Object>>getAllAreaList(){
        return AreaMapper.getAllAreaList();
    }

    /**
     * 获取公司名称
     * @param params
     * @return
     */
    public JsonResult getAreaid(Map<String,Object> params){
        JsonResult result = new JsonResult();
        return result.put(AreaMapper.getAreaid(params));
    }


    public Map<String,Object> getdeptname(Map<String,Object> params){
        return AreaMapper.getdeptname(params);
    }

}
